/**
 * Created by Administrator on 2017/5/2 0002.
 */

import Relay from "react-relay";
export default class ImportGoodsMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { importOrderGoods }`;
    }

    getVariables() {
        return {
            argsInput: {
                type:this.props.type,
                url:this.props.url
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on importOrderGoodsPayload {
            importOrderGoods {
                errorCode
                value
                totalResult
                orderGoodss{
                    productName
                    description
                    orderId
                    purpose
                    gid
                    yarnState
                    createDate
                    fabricWeave
                    price
                    constituent
                    datamatching
                    sailingDate
                    cylinderhead
                    url
                    yarnTypes
                    consumption
                    specification
                    styleNo
                    sendQuantity
                    shuliangjian
                    checkQuantity
                    density
                    quantity
                    amount
                    poNumber
                    yarn
                    bigGoodsQua
                    acceptQuantity
                    gramWeight
                    larghezza
                    size
                    colour
                    prickle
                    desp
                }
                id
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on importOrderGoodsPayload {
            importOrderGoods {
                errorCode
                value
                totalResult
                orderGoodss{
                    productName
                    description
                    orderId
                    purpose
                    gid
                    yarnState
                    createDate
                    fabricWeave
                    price
                    constituent
                    datamatching
                    sailingDate
                    cylinderhead
                    url
                    yarnTypes
                    consumption
                    specification
                    styleNo
                    sendQuantity
                    shuliangjian
                    checkQuantity
                    density
                    quantity
                    amount
                    poNumber
                    yarn
                    bigGoodsQua
                    acceptQuantity
                    gramWeight
                    larghezza
                    size
                    colour
                    prickle
                    desp
                }
                id
                    }
                 }
            `]
        }];
    }

}


